<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link th:href="@{/css/style.css}" rel="stylesheet" type="text/css" />
  <script type="text/javascript" th:src="@{/js/jquery.js}"></script>
</head>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>仓库管理</li>
    <li>入库管理</li>
    <li>添加入库</li>
  </ul>
</div>
<div class="formbody">
  <div class="formtitle"><span>入库信息</span></div>
  <form th:action="@{/rkWarehouse/saveRk}" method="post">
    <ul class="forminfo">
      <li>
        <label>采购单编号</label>
        <select name="rkIndent" class="dfselect">
          <option value="">请选择采购单</option>
          <option th:each="p:${purList}" th:value="${p.purchaseId}">[[${p.purchaseId}]]</option>
        </select>
        &nbsp;&nbsp;
        <a style="cursor: pointer" onclick="cgDeatils()" title="点击查看采购单详细信息" class="tablelink">详情</a>
        <i>必须是审核通过的采购单</i>
      </li>
      <li>
        <label>入库</label>
        <select class="dfselect" name="warehouseId">
            <option>请选择</option>
            <option th:each="w :${wareList}" th:value="${w.id}" >[[${w.cName}]]</option>
        </select>
        <i>必选</i>
      </li>
      <li>
        <label>入库时间</label>
        <input name="rkDate" type="date" class="dfinput" />
        <i>必填</i>
      </li>
      <li>
        <label>入库人</label>
        <input name="userId" type="text" th:value="${session.users.uId}" readonly="readonly" class="roinput" />
        <i>不能编辑</i>
      <li>
      <input name="state" type="hidden" value="1">
        <label>&nbsp;</label>
        <input name="" type="submit" class="btn" value="确认"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input name="" type="button" class="btn" value="返回" onclick="history.go(-1)"/>
      </li>
    </ul>
  </form>
</div>
<script>
  // 采购单详情
  function cgDeatils() {
    var rkIndent = $("select[name=rkIndent]").val();
    if (rkIndent != null && rkIndent !="") {
      location.href="/erp/purchase/details?purchaseId="+rkIndent;
    }
  }
</script>
</body>
</html>
